export default defineNuxtConfig({
  // 启用必要模块
  modules: [
      '@nuxtjs/i18n',
      '@nuxtjs/tailwindcss'
  ],

  css: ['@/assets/styles/variables.scss'],

  vite: {
      css: {
          preprocessorOptions: {
              scss: {
                  additionalData: `@import '@/assets/styles/mixins.scss';`
              }
          }
      }
  },

  // 国际化配置
  i18n: {
      locales: ['en', 'zh'],
      defaultLocale: 'en',
      strategy: 'no_prefix',
      vueI18n: './i18n.config.js'
  },

  // 运行时配置
  runtimeConfig: {
      public: {
          googleClientId: process.env.NUXT_PUBLIC_GOOGLE_CLIENT_ID
      },
      mongoUri: process.env.MONGO_URI,
      jwtSecret: process.env.JWT_SECRET,
      smtpConfig: {
          host: process.env.SMTP_HOST,
          port: process.env.SMTP_PORT,
          user: process.env.SMTP_USER,
          pass: process.env.SMTP_PASS
      }
  },

  // 构建模块配置
  buildModules: [
      '@nuxtjs/eslint-module'
  ],

  // ESLint配置
  eslint: {
      cache: false,
      fix: true
  },

  compatibilityDate: '2025-04-06'
})